package dk.itu.mario.level;

import java.util.HashMap;

public enum ChunkType {
	GENTLE,
	STANDARD,
	ARMY,
	KOOPAKILL,
	DEATHPIT,
	COMB,
	TUBECOMB,
	WALL,
	GAP,
	AIR,
	CANNONMOUNTAIN,
	BLAND;
	
	private static HashMap<ChunkType,Double> modifier = new HashMap<ChunkType,Double>();
	
	public static double modifier(ChunkType type) {
		return modifier.get(type);
	}
	
	public static void init() {
		for (ChunkType i : values()) {
			if (i == COMB || i == GAP || i == AIR) modifier.put(i,0.75);
			else if (i == WALL) modifier.put(i,0.5);
			else modifier.put(i,1.0);
		}
	}
	
	public static void setModifier(ChunkType type, double change) {
		double temp = modifier.get(type);
		temp += change;
		modifier.put(type,temp);
	}
}